import Layout from '@/layout'

const goodsRouter = [
  {
    path: '/goodsManagement',
    component: Layout,
    redirect: '/goodsManagement/allGoods',
    alwaysShow: true,
    name: 'goodsManagement',
    meta: {
      title: '全部商品 - ',
      icon: 'lock'
    },
    children: [
      {
        path: 'goodsSurvey',
        component: () => import('@/views/goods/goodsManagement/goodsSurvey'),
        name: 'goodsSurvey',
        meta: {
          title: '商品概览 - '
        }
      },
      {
        path: 'goodsInfo',
        component: () => import('@/views/goods/goodsManagement/goodsInfo'),
        name: 'goodsInfo',
        meta: {
          title: '商品详情 - '
        }
      },
      {
        path: 'releaseGoods',
        component: () => import('@/views/goods/goodsManagement/releaseGoods'),
        name: 'releaseGoods',
        meta: {
          title: '发布商品 - '
        }
      },
      {
        path: 'addGoodsInfo',
        component: () => import('@/views/goods/goodsManagement/addGoodsInfo'),
        name: 'addGoodsInfo',
        meta: {
          title: '商品维护 - '
        }
      },
      {
        path: 'allGoods',
        component: () => import('@/views/goods/goodsManagement/allGoods'),
        name: 'allGoods',
        meta: {
          title: '全部商品 - '
        }
      },
      {
        path: 'goodsAttr',
        component: () => import('@/views/goods/goodsManagement/goodsAttr'),
        name: 'goodsAttr',
        meta: {
          title: '商品属性 - '
        }
      },
      {
        path: 'goodsComment',
        component: () => import('@/views/goods/goodsManagement/goodsComment'),
        name: 'goodsComment',
        meta: {
          title: '商品评论 - '
        }
      },
      {
        path: 'goodsGroup',
        component: () => import('@/views/goods/goodsManagement/goodsGroup'),
        name: 'goodsGroup',
        meta: {
          title: '商品分组 - '
        }
      },
      {
        path: 'goodsTag',
        component: () => import('@/views/goods/goodsManagement/goodsTag'),
        name: 'goodsTag',
        meta: {
          title: '商品标签 - '
        }
      }
    ]
  },
  {
    path: '/goodsTool',
    component: Layout,
    redirect: '/goodsTool/goodCategory',
    alwaysShow: true,
    name: 'goodsTool',
    meta: {
      title: 'goods',
      icon: 'lock'
    },
    children: [
      {
        path: 'goodCategory',
        component: () => import('@/views/goods/goodsTool/goodCategory'),
        name: 'goodCategory',
        meta: {
          title: '商品类目 - '
        }
      },
      {
        path: 'goodsMaterial',
        component: () => import('@/views/goods/goodsTool/goodsMaterial'),
        name: 'goodsMaterial',
        meta: {
          title: '商品素材 - '
        }
      },
      {
        path: 'priceAdjust',
        component: () => import('@/views/goods/goodsTool/priceAdjust'),
        name: 'priceAdjust',
        meta: {
          title: '价格调整 - '
        }
      }
    ]
  },
  {
    path: '/goodsExtension',
    component: Layout,
    redirect: '/goodsExtension/index',
    alwaysShow: true,
    name: 'goodsExtension',
    meta: {
      title: 'goodsExtension',
      icon: 'lock'
    },
    children: [
      {
        path: 'goodsExtension',
        component: () => import('@/views/goods/goodsExtension/index'),
        name: 'goodsExtensionIndex',
        meta: {
          title: '商品推广 - '
        }
      }
    ]
  }
]
export default goodsRouter
